package com.example.req;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

public class UserLoginRep {

    @NotNull(message = "【loginName】不能为空")
    private String loginName;

    @NotNull(message = "【password】不能为空")
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,32}$", message = "【密码】不匹配")
    private String password;

    public UserLoginRep() {
    }

    public UserLoginRep(@NotNull(message = "【loginName】不能为空") final String loginName, @NotNull(message = "【password】不能为空") @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,32}$", message = "【密码】不匹配") final String password) {
        this.loginName = loginName;
        this.password = password;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(final String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(final String password) {
        this.password = password;
    }
}